angular.module('starter.services')

.factory('Courses', function ($rootScope, $http, $ionicLoading, $ionicPopup, $window) {
	var base = "http://121.40.145.116:9804";
	var courses = [];
	
	courses.push({
		teacher : 'bushcat',
		updateDate : 'Jan 12, 2014',
		intro : 'This is android courses',
		likeNum : 12,
		commentsNum : 101,
		courseImg : "http://121.40.145.116/app/img/android-and-ios.jpg",
		teacherImg : "http://121.40.145.116/app/img/mcfly.jpg"
	});
	
	return {
		getCourses: function(email){
				return $http.post(base+'/api/v1/courses', {
            		token: email
        		});
		},
	};
});